from selenium.webdriver.common.by import By
"""
    以下数据为各模块配置数据
"""

# QQ邮箱url
qq_mail_url = 'https://mail.qq.com/'

# 用户名
username = (By.XPATH, '//*[@id="u"]')
password = (By.XPATH, '//*[@id="p"]')
click_login_btn = (By.XPATH, '//*[@id="login_button"]')
nick_name = (By.XPATH, '//*[@id="useralias"]')

# 写信按钮
write_letter_button = By.XPATH, '//*[@id="composebtn"]'
# 收件人
recipient = By.XPATH, '//*[@id="toAreaCtrl"]/div[2]/input'
# 主题
subject = By.XPATH, '//*[@id="subject"]'
# 正文iframe
content_iframe = By.CLASS_NAME, 'qmEditorIfrmEditArea'
# content = By.XPATH, '//*[@id="QMEditorArea"]/table/tbody/tr[2]/td/iframe'
# 正文
content = By.TAG_NAME, 'body'
# content = By.XPATH, '//*[@id="QMEditorArea"]/table/tbody/tr[2]/td/iframe'
# 发件人父节点
sender_father = '/html/body/form[2]/div[2]/div[8]/div[1]/div[1]/div/div[2]/span[1]'
# 发件人子节点
send_child = '/html/body/div[1]/div/div/div/div[1]/div[2]/div'
# 发送按钮
send_button = By.XPATH, '//*[@id="toolbar"]/div/a[1]'
# iframe
main_iframe = 'mainFrame'
# 获取信息
success_info = By.XPATH, '//*[@id="sendinfomsg"]'

"""
    以下数据为app CSDN应用元素配置信息
"""
# csdn 我的按钮
csdn_my_button = By.XPATH, '/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.RelativeLayout/android.widget.LinearLayout/android.widget.LinearLayout[5]/android.widget.RelativeLayout/android.widget.ImageView'
# 圆登录按钮
csdn_round_login_button = By.ID, 'net.csdn.csdnplus:id/img_login'
# 账号登录
csdn_account_login_button = By.ID, 'net.csdn.csdnplus:id/tv_tab_two'
# 手机号
csdn_phone_button = By.ID, 'net.csdn.csdnplus:id/et_first_account'
# 密码
csdn_pwd_button = By.ID, 'net.csdn.csdnplus:id/et_second_psw'
# 点击同意条款
csdn_agree_button = By.ID, 'net.csdn.csdnplus:id/iv_private'
# 登录
csdn_login_button = By.ID, 'net.csdn.csdnplus:id/tv_confirm'
# 判断用户名 是否为东甲
csdn_account_name = By.ID, 'net.csdn.csdnplus:id/tv_name'
# csdn Package名称
csdn_app_package = 'net.csdn.csdnplus'
# csdn Activity名称
csdn_app_activity = '.activity.SplashActivity'

"""
    APP中欧CRM安卓环境 定位元素
"""
# 包名
zo_appPackage = 'cn.newbanker.investor'
# 启动名
zo_appActivity = 'cn.newbanker.investor.MainActivity'
# 启动名
# 工作台按钮
zo_workbench_button = By.XPATH, '/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.view.ViewGroup/android.view.ViewGroup/android.view.ViewGroup/android.view.ViewGroup/android.widget.FrameLayout/android.view.ViewGroup/android.view.ViewGroup/android.view.ViewGroup[2]/android.view.ViewGroup[3]/android.view.ViewGroup/android.widget.ImageView'
# 工作台标题
zo_workbench_title = By.XPATH, '/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.view.ViewGroup/android.view.ViewGroup/android.view.ViewGroup/android.view.ViewGroup/android.widget.FrameLayout/android.view.ViewGroup/android.view.ViewGroup/android.view.ViewGroup[1]/android.view.ViewGroup/android.view.ViewGroup[1]/android.widget.TextView'